package com.example.commonmistak.designpatterns.template.service;

import com.example.commonmistak.designpatterns.template.entity.Item;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @author xiongwei
 * @date 2022/1/14 11:26
 */
@Service("internalUserCart")
public class InternalUserCart extends AbstractCart {
    @Override
    protected void processCouponPrice(long userId, Item item) {
        item.setCouponPrice(BigDecimal.ZERO);
    }

    @Override
    protected void processDeliveryPrice(long userId, Item item) {
        item.setDeliveryPrice(BigDecimal.ZERO);
    }
}
